/**
 * 
 */
package com.zhanggz.mypattern.proxy;

import java.util.Random;

/**
 * 小汽车
 * 
 * @author alex
 * @Date Jun 27, 2015
 */
public class Car implements Moveable {

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.zhanggz.mypattern.proxy.Moveable#move()
	 */
	public void move() {
//		long starttime = System.currentTimeMillis();
//		System.out.println("汽车开始行驶。。。");
		
		// 实现开车
		try {
			Thread.sleep(new Random().nextInt(1000));
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
//		long endtime = System.currentTimeMillis();
//		System.out.println("汽车结束行驶。。。汽车行驶时间：" + (endtime - starttime) + "毫秒！");
	}

}
